import Vue from 'vue'
import Router from 'vue-router'
import top250 from '@/components/top250'
import home from '@/components/home'
import onfilm from '@/components/onfilm'
import intheaters from '@/components/intheaters'
import homepage from '@/components/homepage'
import music from '@/components/music'
import book from '@/components/book'
import album from '@/components/album'
import count from '@/components/count'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'homepage',
      component: homepage,
      redirect: '/home',
      children:[
        {
          path: '/home',
          name: 'home',
          component: home,
          redirect: '/top250',
          children: [
            {
              path: '/top250',
              name: 'top250',
              component: top250
            },
            {
              path: '/onfilm',
              name: 'onfilm',
              component: onfilm
            },
            {
              path: '/intheaters',
              name: 'intheaters',
              component: intheaters
            }
          ]
        },
        {
          path:'/music',
          name:'music',
          component: music
        },
        {
          path:'/book',
          name:'book',
          component: book
        },
        {
          path:'/album',
          name:'album',
          component: album
        },
        {
          path: '/count',
          name: 'count',
          component: count
        }
      ]
    },


  ]
})
